Minimize the Maximum of Two Arrays solution